import { defineStore } from "pinia";
import { ref } from "vue";

export const useUsersStore = defineStore("users", () => {
  const username = ref<string>(localStorage.getItem("name") || "");

  const changeName = (name: string) => {
    username.value = name;
    localStorage.setItem("name", name);
  };

  return { username, changeName };
});
